<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Library Overview</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '00636.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="00626.html" target="topic">OSAL Library Help</a> &gt; <a href="00645.html" target="topic">Using the Library</a> &gt; <a href="00636.html" target="topic">Library Overview</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="00627.html" target="topic">Previous</a> | <a href="00645.html" target="topic">Up</a> | <a href="00633.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: OSAL Library Overview Topic Title: Library Overview)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
Library Overview</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10" style="text-align: justify;">
The OSAL Library provides a defined interface such that driver and middleware developers will be able to create MPLAB Harmony code that can safely operate in a multi-threaded environment when a supported RTOS is present yet will still compile and function correctly when MPLAB Harmony is being used in a non-RTOS environment with an interrupt or non-interrupt driven application model.&nbsp;</p>
<p class="Element10" style="text-align: justify;">
At the application layer, the developer is encouraged to use the specific features of a chosen RTOS once it has been selected since this is likely to provide a more effective and rich programming environment.&nbsp;</p>
<p class="Element10" style="text-align: justify;">
The OSAL Library is deliberately designed to be a thin layer over an underlying RTOS, which presents a predefined interface to the common features used by the majority of Real-Time Operating Systems, which includes:</p><div class="Element63">
<div class="TableDiv">
<table cellspacing="0" class="Table4">
<tr>
<td class="Element65" valign="top" width="40%">
<div class="Element66">
Library Interface Section&nbsp;</div></td><td class="Element65" valign="top" width="60%">
<div class="Element66">
Description&nbsp;</div></td></tr><tr>
<td class="Element67" valign="top" width="40%">
<div class="Element68">
Semaphore Functions&nbsp;</div></td><td class="Element67" valign="top" width="60%">
<div class="Element68">
Binary and counting semaphores.&nbsp;</div></td></tr><tr>
<td class="Element67" valign="top" width="40%">
<div class="Element68">
Mutex Functions&nbsp;</div></td><td class="Element67" valign="top" width="60%">
<div class="Element68">
Thread and resource locking mechanism.&nbsp;</div></td></tr><tr>
<td class="Element67" valign="top" width="40%">
<div class="Element68">
Critical Section Functions&nbsp;</div></td><td class="Element67" valign="top" width="60%">
<div class="Element68">
Application and scheduler locking mechanism.&nbsp;</div></td></tr><tr>
<td class="Element67" valign="top" width="40%">
<div class="Element68">
Memory Allocation Functions&nbsp;</div></td><td class="Element67" valign="top" width="60%">
<div class="Element68">
Memory allocation primitives or wrappers.&nbsp;</div></td></tr><tr>
<td class="Element67" valign="top" width="40%">
<div class="Element68">
OSAL Control Functions&nbsp;</div></td><td class="Element67" valign="top" width="60%">
<div class="Element68">
OSAL initialization.&nbsp;</div></td></tr></table></div></div>
<p class="Element10" style="text-align: justify;">
One of the primary design guidelines is that a host operating system may not be present and so any operations that the OSAL presents are designed to compile out to safe default implementations if no RTOS is present. This can mean the following:</p>
<ul class="Element630">
<li class="Element600">Implementing a dummy function that mimics typical RTOS behavior</li>
<li class="Element600">Implementing a <span class="Element146">#define</span> or inline function that returns a 'safe' generic return value, such as 'true' or a 'call succeeded' status</li>
<li class="Element600">Returning a OSAL_RESULT_NOT_IMPLEMENTED value to indicate an unsupported operation</li>
<li class="Element600">Throwing an OSAL_ASSERT failure to indicate a terminal error that prevents operation under specific circumstances</li>
</ul></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="00626.html" target="topic">OSAL Library Help</a> &gt; <a href="00645.html" target="topic">Using the Library</a> &gt; <a href="00636.html" target="topic">Library Overview</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="00627.html" target="topic">Previous</a> | <a href="00645.html" target="topic">Up</a> | <a href="00633.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: OSAL Library Overview Topic Title: Library Overview)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>